package com.itheima.zy;

import java.util.Scanner;

public class di4 {
Scanner sc = new Scanner(System.in);
    private String name=sc.next();
    private String age=sc.next();
    //无参构造

    public di4() {
    }
    //有参构造

    public di4(Scanner sc, String name, String age) {
        this.sc = sc;
        this.name = name;
        this.age = age;
    }
    //getter和setter方法

    public Scanner getSc() {
        return sc;
    }

    public void setSc(Scanner sc) {
        this.sc = sc;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "di4{" +
                "sc=" + sc +
                ", name='" + name + '\'' +
                ", age='" + age + '\'' +
                '}';
    }
}
